﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace IDAL
{
    public interface ICommentDAL
    {
        /// <summary>
        /// 根据传入的photoID判断是否存在评论
        /// </summary> 
        bool commentExist(int photoId);

        /// <summary>
        /// 添加一条评论
        /// </summary>
        bool addComment(Model.Comment comment);


        /// <summary>
        /// 更新一条评论
        /// </summary>
        bool updateComment(Model.Comment comment);


        /// <summary>
        /// 删除一条评论
        /// </summary>
        bool deleteCommentById(int commentId);

        /// <summary>
        /// 根据photoId删除所有评论
        /// </summary>
        bool deleteAllByPhotoId(int photoId);

        /// <summary>
        /// 获取comment对象
        /// </summary>
        Model.Comment getModel(int commentId);

        /// <summary>
        /// 根据userId获取所有评论对象
        /// </summary>
        List<Model.Comment> getModelByUserId(int userId);

        /// <summary>
        /// 根据photoId获取所有评论对象
        /// </summary>
        List<Model.Comment> getModelByPhotoId(int photoId);
    }
}